/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Model;

/**
 *
 * @author hicham
 * this class represents a field of a form
 */
public class FormField {
    public static int idLastCreated = 0;
    
    private int id;
    private String nameDisplayed; // name of the field as it appears for the user
    private String nameId; // name of the field in the form (id)
    private String type; // text area, check box, radio button, etc. (not compulsory)

    public FormField() {
        super();
        this.id = Commun.IncrementId(idLastCreated,1);
    }
    
    public FormField(String nameId) {
        this();
        this.nameId = nameId;
    }

    public FormField(String nameId, String type) {
        this();
        this.nameId = nameId;
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

     public String getNameDisplayed() {
        return nameDisplayed;
    }

    public void setNameDisplayed(String nameDisplayed) {
        this.nameDisplayed = nameDisplayed;
    }

    public String getNameId() {
        return nameId;
    }

    public void setNameId(String nameId) {
        this.nameId = nameId;
    }
}
